package com.java.base.exercise.funcationinterface;


import java.util.Arrays;
import java.util.List;
import java.util.function.Consumer;

/**
 * java 8 【consumer 数据获取函数】
 */
public class ConsumerFunction {


    public static void consumer(List<String> paramList, Consumer<String> consumer){

        paramList.forEach(consumer);


    }


    public static void main(String[] args) {

        List<String> languages=Arrays.asList("java","python","golang","c","c#");
        consumer(languages, System.out::println);
    }




}
